<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07_相对定位</title>
    <style>
        .fu{
            background-color: #ff0;
            position: relative;/*子绝父相：子元素会以使用了相对定位的父元素作为移动参照物*/
        }
        .fu>div{
            width: 100px;
            height: 100px;
        }
        .z1{
            background-color: #f00;
        }
        .z2{
            background-color: #0f0;
            /*绝对定位：会脱离文档流并释放布局空间 移动参照物为使用了非静态定位的上层元素，逐级向上终点是html*/
            position: absolute;
            right: 0;
            top: 0;
        }
        .z3{
            background-color: #00f;
        }
    </style>
</head>
<body>
<div class="fu">
  <div class="z1"></div>
  <div class="z2"></div>
  <div class="z3"></div>
</div>
</body>
</html>